import Vue from 'vue'
import App from '@/App.vue'
import router from '@/router'
import store from '@/store'
import "assets/styl/reset.styl"
// 适配
import 'lib-flexible/flexible'
// 解决移动端点击3秒延时
import attachFastClick from 'fastclick'
attachFastClick.attach(document.body)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

attachFastClick.attach(document.body);
attachFastClick.prototype.focus = function (targetElement) {
  let length;
  if (targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
    length = targetElement.value.length;
    targetElement.focus();
    targetElement.setSelectionRange(length, length);
  } else {
    targetElement.focus();
  }
}